/***********************************************************************************************//**
 * \file   batt.h
 * \brief  Battery Service
 ***************************************************************************************************
 * <b> (C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
 ***************************************************************************************************
 * This file is licensed under the Silabs License Agreement. See the file
 * "Silabs_License_Agreement.txt" for details. Before using this software for
 * any purpose, you must agree to the terms of that agreement.
 **************************************************************************************************/

#ifndef BATT_H
#define BATT_H

#ifdef __cplusplus
extern "C" {
#endif

/***********************************************************************************************//**
 * \defgroup batt Battery
 * \brief Battery Service API
 **************************************************************************************************/

/***********************************************************************************************//**
 * @addtogroup Features
 * @{
 **************************************************************************************************/

/***********************************************************************************************//**
 * @addtogroup batt
 * @{
 **************************************************************************************************/


/***************************************************************************************************
  Public Macros and Definitions
***************************************************************************************************/

/***************************************************************************************************
  Function Declarations
***************************************************************************************************/

/***********************************************************************************************//**
 *  \brief  Initialise Battery Service.
 *  \details  Initialise the connection ID, the configuration flags of the temperature measurement
 *  and stop temperature measurement timer.
 **************************************************************************************************/
void battInit(void);

/***********************************************************************************************//**
 *  \brief  Battery CCCD has changed event handler function.
 *  \param[in]  connection  Connection ID.
 *  \param[in]  clientConfig  New value of CCCD.
 **************************************************************************************************/
void battCharStatusChange(uint8_t connection, uint16_t clientConfig);

/***********************************************************************************************//**
 *  \brief  Make one battery measurement.
 **************************************************************************************************/
void battMeasure(void);

/***********************************************************************************************//**
 *  \brief  Read battery measurement.
 **************************************************************************************************/
void battRead(void);


/** @} (end addtogroup hr) */
/** @} (end addtogroup Features) */

#ifdef __cplusplus
};
#endif

#endif /* BATT_H */
